package colab.persistencia;
import java.sql.*;

public class Conexao {
	
	static String status="Sem conexao.";
	
	static public Connection getConnection(){
		Connection conexao = null;
		
		try{
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			conexao = DriverManager.getConnection(
					"jdbc:mysql://colab.myftp.org:3306/colab", "colab", "115599");
			status = "Conectado.";
		}
		
		catch (SQLException e){
			status = e.getMessage();
		}
		
		catch (ClassNotFoundException e){
			status = e.getMessage();
		}
		
		catch (Exception e){
			status = e.getMessage();
		}
		
		return conexao;
	}

	public static String getStatus() {
		return status;
	}
	
	

}
